<script>
    $(function(){
        $('.product_cat').hide();
        $('#product_' + getHash()).show();
    });
</script>    
<div class="submenu">
        <table style="width: 100%; text-align: center; font-size: 16px; font-weight: bold;">
            <tr>
                <?foreach($categories as $k=>$category):?>
                    <td style="width: <?=100/count($categories);?>%;" onclick="show_cat('<?=$category['id'];?>');" class="category_button">
                        <span style="width: 100%;"><?=stripslashes($category['title']);?></span>
                    </td>
                <? endforeach; ?>
            </tr>
        </table>
    </div>
<h1><?=$product['title'];?></h1>
    <div style="width: 100%; height: auto;">
        &nbsp;&nbsp;&nbsp;<?= str_replace('<br />', '<br />&nbsp;&nbsp;', nl2br(stripslashes($product['description'])));?>
    </div>
    <div style="width: 100%; height: auto;">
        &nbsp;&nbsp;&nbsp;<a style="font-size: 11px;" href="<?=BASE_URL;?>price.php">Просмотреть прайс-лист</a>
    </div>
    <?if(count($images)>0):?>
    <?  foreach ($images as $key => $image):?>
        <div style="width: 300px; height: 200px; margin: 10px; float: left; text-align: center;">
            <a href="<?=BASE_URL . $image['path'];?>"><img src="<?=BASE_URL . $image['path'];?>" style="height: 165px; padding: 5px 0;" /></a><br />
            <?=$image['description'];?>
        </div>
    <?endforeach;?>
    <?endif;?>

